package com.nx.vip.jvm.oom;



public class DirectMemoryTest {
    public static int _1MB=1024*1024;

    //堆外内存溢出
    //不要执行，会死机
    //
    public static void main(String[] args) throws Exception{
//        Field unsafeField= Unsafe.class.getDeclaredFields()[0];
//        unsafeField.setAccessible(true);
//        Unsafe unsafe =(Unsafe) unsafeField.get(null);
//        while (true){
//            unsafe.allocateMemory(_1MB);
//        }
    }
}
